#include <stdio.h>
#include <string.h>
int main()
{
    unsigned short int ans;
    unsigned short int G[500], p[500];
    unsigned short int Glen = 0, plen = 0;
    char a[2000];
    char *pos;
    gets(a);

    while ((pos = strstr(a, "Genshin")) != NULL)
    {
        *pos = '0';
        G[Glen] = (pos - a) / sizeof(char) + 1;
        Glen++;
    }
    while ((pos = strstr(a, "player")) != NULL)
    {
        *pos = '0';
        p[plen] = (pos - a) / sizeof(char) + 1;
        plen++;
    }
    for (int i = 0; i < Glen; i++)
    {
        for (int j = 0; j < plen; j++)
        {
            if (G[i] < p[j])
            {
                ans++;
            }
        }
    }
    printf("%d", ans);
}
